package manage.util.excel;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class SheetRow {
	private final Integer height;
	private final List<SheetCell> cells;

	/**
	 * 
	 *  cells
	 */
	public SheetRow(SheetCell... cells){
		this(null,cells);
	}
	/**
	 * 
	 *  cells
	 *  height
	 */
	public SheetRow(Integer height,SheetCell... cells){
		this.cells= new ArrayList<>();
		this.cells.addAll(Arrays.asList(cells));
		this.height=height;
	}

	public SheetRow addCell(SheetCell... cells){
		this.cells.addAll(Arrays.asList(cells));
		return this;
	}

	public SheetCell[] getCells() {
		return cells.toArray(new SheetCell[] {});
	}

	public Integer getHeight() {
		return height;
	}
}
